package com.xbhog.screwdemo.聚合根;

public class OrderItem extends BaseEntity {
    private String productName;
    private int quantity;
    private double price;

    public OrderItem(String productName, int quantity, double price) {
        this.productName = productName;
        this.quantity = quantity;
        this.price = price;
    }

    public double getTotalPrice() {
        return quantity * price;
    }

//省略getter和setter方法
}